package thread;

public class Demo13 {
    public static void main(String[] args) throws InterruptedException {
        Thread mainThread = Thread.currentThread();
        Thread t1 = new Thread(()->{
            System.out.println("开始等待main");
            try {
                mainThread.join();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("等待结束");
        });
        t1.start();
        Thread.sleep(3000);
    }
}
